/* eslint-disable vue/valid-v-model */
<template>
  <div class="home">
    <Button size="lg" @click="onClick">Hello {{ store.getters['myachat/getUser'] }}</Button>
    <img alt="Vue logo" src="../assets/logo.png">
    <a-input v-model:value="store.getters['myachat/getUser']" placeholder="Basic usage" />
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { useStore } from 'vuex'
import { Button } from 'ant-design-vue'
import mychat from '../store/modules/chat'

export default defineComponent({
  name: 'Home',
  components: {
    Button
  },
  setup () {
    const store = useStore()
    store.registerModule('myachat', mychat)
    return {
      store,
      onClick: () => {
        store.commit('myachat/SHOW_LOADING','hello')
        store.dispatch('myachat/login','hello')
        
      }
    }
  }
})
</script>
